hcf by prime factorisation method